import CommonTable from '@/components/CommonTable';

const Alarms = (props) => {
  const { data } = props;
  const columns = [
    {
      title: '序号',
      width: 65,
      fixed: 'left',
      render: (text, record, index) => index + 1,
    },
    {
      title: '报警类型',
      dataIndex: 'alarmTypeName',
      width: 100,
    },
    {
      title: '报警时间',
      dataIndex: 'alarmTime',
      width: 200,
    },
    {
      title: '组织名称',
      dataIndex: 'groupName',
      width: 100,
    },
    {
      title: '车牌号',
      dataIndex: 'license',
      width: 120,
    },
    {
      title: '车牌颜色',
      dataIndex: 'plateColor',
      width: 100,
    },
    {
      title: '司机姓名',
      dataIndex: 'staffName',
      width: 100,
    },
    {
      title: '报警描述',
      dataIndex: 'alarmDesc',
      width: 100,
    },
    {
      title: '持续时间',
      dataIndex: 'duration',
      width: 100,
    },
    {
      title: '纬度',
      dataIndex: 'lat',
      width: 100,
    },
    {
      title: '经度',
      dataIndex: 'lng',
      width: 100,
    },
    {
      title: '位置',
      dataIndex: 'address',
      width: 100,
    },
    {
      title: '速度（km/h）',
      dataIndex: 'speed',
      width: 130,
    },
    {
      title: '方向',
      dataIndex: 'direction',
      width: 100,
    },
    {
      title: '里程（km）',
      dataIndex: 'mileage',
      width: 120,
    },
    {
      title: '系统时间',
      dataIndex: 'time',
      width: 200,
    },
  ];
  return <CommonTable dataSource={data} columns={columns} pagination={false} />;
};

export default Alarms;
